package com.kcht.np.common.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import java.util.List;

/**
  * <p>
  * 树节点
  * </p>
  *
 */

@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class TreeNode implements java.io.Serializable {

    /**
      * @Description:   获取 当前节点 ID
      * @CreateDate:    2020/3/31 10:56
     */
    private long id;

    /**
      * @Description:   当前节点标题
      * @CreateDate:    2020/3/31 10:57
     */
    private String title;

    /**
      * @Description:   上级节点 ID
      * @CreateDate:    2020/3/31 10:57
     */
    private long parentId;

    /**
      * @Description:   源属性
      * @CreateDate:    2020/3/31 10:57
     */
    private Object source;

    /**
      * @Description:   获取 所有子节点
      * @CreateDate:    2020/3/31 10:57
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TreeNode> children;

}
